package com.the_ring.chapter06.util;

import android.graphics.Bitmap;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;

public class FileUtil {

    public static void saveImage(String path, Bitmap pic) {
        try {
            FileOutputStream fos = new FileOutputStream(path);
            pic.compress(Bitmap.CompressFormat.JPEG, 80, fos);
        } catch (FileNotFoundException e) {
            throw new RuntimeException(e);
        }
    }
}
